public class QuizCheck
{
   /**
      Checks whether a string of quiz answers is valid. It must 
      contain an answer A, B, C, or D for each expected answer, or an 
      X to indicate that no answer was provided.
      @param input the answer string
      @param questions the number of questions in the string
      @return true if the string was valid, false otherwise
   */
   public static boolean checkInputs(String input, int questions)
   {
      int leni=input.length();
      if(leni<questions)
      return false;
      for(int i=0;i<questions;i++)
      {
         char charinput=input.charAt(i);
         if(charinput=='A'||charinput=='B'||charinput=='C'||charinput=='D'||charinput=='X') ;
         else
         return false;
      }
      return true;
   }
}